<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>后台管理系统</title>
		<link rel="stylesheet" href="layui/css/layui.css">
		<link rel="stylesheet" href="static/css/style.css">
		<style>
			/*#majhkl{
				display: none;
			}*/
		</style>
	</head>

	<body class="layui-layout-body">
		<div class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo">小鸡外卖后台管理</div>
				<!-- 头部区域（可配合layui已有的水平导航） -->
				<ul class="layui-nav layui-layout-left">

				</ul>
				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item">
						<a href="javascript:;"><span>欢迎</span> <span style=" color: white;" class="userName">贤心</span></a>
					</li>
					<li class="layui-nav-item">
						<a href="login.html">退出</a>
					</li>
				</ul>
			</div>
			<div class="layui-side layui-bg-black">
				<input type="hidden" name="userId" class="userId" />
				<div class="layui-side-scroll">
					<ul class="layui-nav layui-nav-tree" lay-filter="test">
						<li class="layui-nav-item layui-nav-itemed">
							<a class="" href="javascript:;">用户管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="1" data-href="user.html">查看用户</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="2" data-href="userAgent.html">查看代理</a>
								</dd>

							</dl>
						</li>
						<li class="layui-nav-item layui-nav-itemed abc" id='majhkl'>
							<a class="" href="javascript:;">商家管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="3" data-href="couponMerchant.html">查看商家</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="4" data-href="examine.html">商家审核</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="20" data-href="company.html">商家优惠劵</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item layui-nav-itemed">
							<a class="" href="javascript:;">骑手管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="21" data-href="rding.html">查看骑手</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="22" data-href="ridingAudit.html">骑手审核</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item layui-nav-itemed">
							<a class="" href="javascript:;">公告管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="5" data-href="systemAnnment.html">系统公告</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="6" data-href="annment.html">商家公告</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="7" data-href="tt.html">头条</a>
								</dd>
							</dl>
						</li>

						<!--<li class="layui-nav-item">
							<a class="" href="javascript:;">优惠劵管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="16" data-href="book.html">修改信息</a>
								</dd>
							</dl>
						</li>-->
						<li class="layui-nav-item">
							<a class="" href="javascript:;">消费管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="7" data-href="Serve.html">消费记录</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a class="" href="javascript:;">收入管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="8" data-href="plateinfo.html">商家收款记录</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="9" data-href="plate_lowinfo.html">骑手收款记录</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="25" data-href="platelowinfo.html">代理收款记录</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a class="" href="javascript:;">提现管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="10" data-href="set.html">提现列表</a>
								</dd>
								<dd>
									<!--<a class="side-active" href="javascript:;" data-id="11" data-href="test1.html">提现审核</a>-->
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a class="" href="javascript:;">设置</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="side-active" href="javascript:;" data-id="12" data-href="ad.html">轮播图</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="13" data-href="test1.html">推荐商家</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="14" data-href="Large.html">大类</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="15" data-href="freight.html">送费</a>
								</dd>
								<dd>
									<a class="side-active" href="javascript:;" data-id="16" data-href="coupon.html">平台优惠劵</a>
								</dd>
							</dl>
						</li>
					</ul>
				</div>
			</div>
			<div class="layui-body">
				<div class="layui-tab layui-bg-gray" lay-filter="iframe-tab" lay-allowclose="true" style="margin:0;">
					<ul class="layui-tab-title">
						<!--<li class="layui-this" lay-allowclose="false">首秀啊</li>-->
					</ul>
					<div class="layui-tab-content layui-iframe" style="padding:0;">
						<!--<div class="layui-tab-item layui-show">
							<iframe frameborder="0" src="happy.html" class="tab-iframe"></iframe>
						</div>-->
					</div>
				</div>
			</div>
			<div class="layui-footer">

			</div>
		</div>
		<script src="layui/layui.js"></script>
		<script src="js/jquery.min.js"></script>
		<script src="js/common.js"></script>
		<script>
			var layer;
			$(function() {
				console.log("4")
				$(".userName").text(localStorage.getItem("userName"));
				$(".userId").text(localStorage.getItem("userId"));
				var role = localStorage.getItem("role");
				var status = localStorage.getItem("status");
//				if(role == 2) {
//					$('#majhkl').css('display', 'none')
//				}

				//				$.ajax({
				//				type: "post",
				//				url: baseurl + "/user/queryUser",
				//				data: {
				//					id: userId
				//				},
				//				success: function(data) {
				//					console.log(data)
				//					$(".id").val(data.data.id);
				//					$(".name").val(data.data.name);
				//					$(".address").val(data.data.address);
				//					$(".phone").val(data.data.phone);
				//					$(".proportion").val(data.data.proportion);
				//				}
				//			});

				layui.use(['element', 'layer'],
					function() {

						var $ = layui.jquery, //引入jquery
							element = layui.element; //tab-iframe
						layer = layui.layer; //tab-iframe
						$('.side-active').on('click', function() {
							var id = $(this).attr('data-id');
							var title = $(this).html();
							var url = $(this).attr('data-href');
							//判断是否存在
							for(var i = 0; i < $('.tab-iframe').length; i++) {
								if($('.tab-iframe').eq(i).attr('src') == url) {
									element.tabChange('iframe-tab', id);
									return;
								}
							};
							//新增一个Tab项
							res = element.tabAdd('iframe-tab', {
								title: $(this).html() //用于演示
									,
								content: '<iframe frameborder="0" src="' + url + '" class="tab-iframe"></iframe>',
								id: id
							})
							element.tabChange('iframe-tab', id);
						});
						$(".changeuse").click(function() {
							//页面层
							layer.open({
								type: 2,
								title: '修改个人资料',
								maxmin: true,
								area: ['500px', '500px'],
								content: 'changehoutaiuserInfo.html',
							});

						})
						$(".changepwd").click(function() {
							//页面层
							layer.open({
								type: 2,
								title: '修改密码',
								maxmin: true,
								area: ['500px', '500px'],
								content: 'changepwd.html',
							});

						})

					});
			})
		</script>
	</body>

</html>